<template>
  <div id="app">
    <el-row class="tac" v-if="$route.name !== 'login'">
      <nav-menu></nav-menu>
      <el-col :span="20" class="main">
        <nav-bar></nav-bar>
        <router-view style="margin: 20px;" />
      </el-col>
    </el-row>
    <router-view v-else />
  </div>
</template>

<script>
import NavBar from "@/components/navBar";
export default {
  data() {
    return {};
  },
  created() {
  },
  methods: {
  },
  computed: {
  },
  components: {NavBar}
};
</script>

<style lang="less">
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;

  .main {
    height: 100vh;
    box-sizing: border-box;
    background-color: #f5f5f5;

    .top {
      display: flex;
      padding: 0 20px;
      justify-content: space-between;
      align-items: center;
      height: 60px;
      background: #fff;

      .userinfo {
        display: flex;

        .user_block {
          display: inline-block;
          border: 1px solid #000;
          padding: 2px;
          border-radius: 50%;
          margin-left: 30px;
        }
      }

      .site_title {
        color: #409eff;
      }
    }
  }
}

#nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>